package controller;

import view.View;
import model.Model;
import model.Product;

public class Controller {
	private Model model;
	private View view;

	public Controller(Model model, View view) {
		this.model = model;
		this.view = view;
	}

	public Model getModel() {
		return model;
	}

	public void setModel(Model model) {
		this.model = model;
	}

	public View getView() {
		return view;
	}

	public void setView(View view) {
		this.view = view;
	}

	public void addProduct(Product product) {
		model.getProducts().add(product);
	}

	public void viewAllProducts() {
		view.viewAllProducts();
	}
}
